<?php
/*
 * @Author: 李明
 * @Date: 2021-08-24 11:59:43
 * @LastEditTime: 2021-11-30 18:06:14
 * @LastEditors: 李明
 * @Description: 
 * @FilePath: /CRM2.0-PHP/app/Models/RolePower.php
 * @山东壹零贰肆信息科技有限公司
 */

/**
 * Created by Reliese Model.
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * Class RolePower
 * 
 * @property int $id
 * @property int|null $role_id
 * @property int|null $power_id
 * @property string|null $update_time
 * @property string|null $create_time
 * 
 * @property Power|null $power
 * @property Role|null $role
 *
 * @package App\Models
 */
class RolePower extends Model
{
    protected $table = 'role_power';

    protected $casts = [
        'role_id' => 'int',
        'power_id' => 'int'
    ];

    protected $fillable = [
        'role_id',
        'power_id'
    ];

    public function power()
    {
        return $this->belongsTo(Power::class);
    }

    public function role()
    {
        return $this->belongsTo(Role::class);
    }
}
